mergedString = ""
File.open($buildfile, File::RDONLY).each { |fileName|
	File.open(fileName.chomp, File::RDONLY).each { |line|
		mergedString += line.sub(/#include:(.*)/) { |m| File.read($1) }
	}
}

outputFile = File.new($outputfile, "w")
outputFile.write(mergedString)

version = "Gimme v2.6.0 (Digory) :: "
n = Time.now
buildTime = n.month().to_s + "/" + n.day().to_s + "/" + n.year().to_s + ", " + n.hour().to_s + ":" + n.min().to_s + ":" + n.sec().to_s

outputFile.write("Gimme.ver='" + version + buildTime + "';")

outputFile.close